﻿using System.Windows.Forms;

namespace DevelopersTestPad.AppFrame
{
    internal static class Messages
    {
        /// <summary>
        /// Shows an error message.
        /// </summary>
        /// <param name="message">An error message.</param>
        public static void ShowError(string message)
        {
            MessageBox.Show(message,
                            Application.ProductName,
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
        }

        /// <summary>
        /// Shows an exclamation message.
        /// </summary>
        /// <param name="message">An exclamation message.</param>
        public static void ShowExclamation(string message)
        {
            MessageBox.Show(message,
                            Application.ProductName,
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation);
        }

        /// <summary>
        /// Shows a question message.
        /// </summary>
        /// <param name="message">A question message.</param>
        /// <returns>Result</returns>
        public static DialogResult ShowQuestion(string message)
        {
            return MessageBox.Show(message,
                                   Application.ProductName,
                                   MessageBoxButtons.YesNoCancel,
                                   MessageBoxIcon.Question,
                                   MessageBoxDefaultButton.Button3);
        }
    }
}
